<template>
    <div>
        <XhButton type="primary" @click="handleMessage">点击</XhButton>
        <XhButton type="info" @click="handleMessage2">点击</XhButton>
        <XhButton type="success" @click="handleMessage3">点击</XhButton>
        <XhButton type="danger" @click="handleMessage4">点击</XhButton>
    </div>
</template>

<script setup>
import XhButton from '@xh-UI/components/button';
import XHMessage from '@xh-UI/components/message';

const handleMessage = () => {
    XHMessage({
        type: "success",
        message: "我是成功的消息提示",
        duration: 1000,
    });
};
const handleMessage2 = () => {
    XHMessage({
        type: "warning",
        message: "我是警告的消息提示",
        duration: 1000,
    });
};
const handleMessage3 = () => {
    XHMessage({
        type: "info",
        message: "我是info的消息提示",
        duration: 1000,
    });
};
const handleMessage4 = () => {
    XHMessage({
        type: "error",
        message: "我是失败的消息提示",
        duration: 1000,
    });
};
</script>

<style lang="less">
.xh-button {
    margin-right: 10px;
}
</style>
